package Deom9;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 周斌
 * Date: 2023-11-19
 * Time: 22:58
 */
public class A {
    public A() {
        fun1();
    }
    public void fun1() {
        System.out.println("父类中的重写方法");
    }
}
class B extends A {
    public int num =1;
    public B() {
        System.out.println("子类的构造方法");
    }

    @Override
    public void fun1() {
        System.out.println("子类的重写方法");
    }
}
